// Copyright 2021-2025 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// source: google/rpc/context/attribute_context.proto
/**
 * @fileoverview
 * @enhanceable
 * @suppress {missingRequire} reports error on implicit type usages.
 * @suppress {messageConventions} JS Compiler reports an error if a variable or
 *     field starts with 'MSG_' and isn't a translatable message.
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck

var jspb = require('google-protobuf');
var goog = jspb;
var global = globalThis;

var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
goog.object.extend(proto, google_protobuf_duration_pb);
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
goog.object.extend(proto, google_protobuf_struct_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.google.rpc.context.AttributeContext', null, global);
goog.exportSymbol('proto.google.rpc.context.AttributeContext.Api', null, global);
goog.exportSymbol('proto.google.rpc.context.AttributeContext.Auth', null, global);
goog.exportSymbol('proto.google.rpc.context.AttributeContext.Peer', null, global);
goog.exportSymbol('proto.google.rpc.context.AttributeContext.Request', null, global);
goog.exportSymbol('proto.google.rpc.context.AttributeContext.Resource', null, global);
goog.exportSymbol('proto.google.rpc.context.AttributeContext.Response', null, global);
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.google.rpc.context.AttributeContext = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.context.AttributeContext.repeatedFields_, null);
};
goog.inherits(proto.google.rpc.context.AttributeContext, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.google.rpc.context.AttributeContext.displayName = 'proto.google.rpc.context.AttributeContext';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.google.rpc.context.AttributeContext.Peer = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.rpc.context.AttributeContext.Peer, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.google.rpc.context.AttributeContext.Peer.displayName = 'proto.google.rpc.context.AttributeContext.Peer';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.google.rpc.context.AttributeContext.Api = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.rpc.context.AttributeContext.Api, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.google.rpc.context.AttributeContext.Api.displayName = 'proto.google.rpc.context.AttributeContext.Api';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.google.rpc.context.AttributeContext.Auth = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.google.rpc.context.AttributeContext.Auth.repeatedFields_, null);
};
goog.inherits(proto.google.rpc.context.AttributeContext.Auth, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.google.rpc.context.AttributeContext.Auth.displayName = 'proto.google.rpc.context.AttributeContext.Auth';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.google.rpc.context.AttributeContext.Request = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.rpc.context.AttributeContext.Request, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.google.rpc.context.AttributeContext.Request.displayName = 'proto.google.rpc.context.AttributeContext.Request';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.google.rpc.context.AttributeContext.Response = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.rpc.context.AttributeContext.Response, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.google.rpc.context.AttributeContext.Response.displayName = 'proto.google.rpc.context.AttributeContext.Response';
}
/**
 * Generated by JsPbCodeGenerator.
 * @param {Array=} opt_data Optional initial data array, typically from a
 * server response, or constructed directly in Javascript. The array is used
 * in place and becomes part of the constructed object. It is not cloned.
 * If no data is provided, the constructed object will be empty, but still
 * valid.
 * @extends {jspb.Message}
 * @constructor
 */
proto.google.rpc.context.AttributeContext.Resource = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.rpc.context.AttributeContext.Resource, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.google.rpc.context.AttributeContext.Resource.displayName = 'proto.google.rpc.context.AttributeContext.Resource';
}

/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.google.rpc.context.AttributeContext.repeatedFields_ = [8];



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.google.rpc.context.AttributeContext.prototype.toObject = function(opt_includeInstance) {
  return proto.google.rpc.context.AttributeContext.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.google.rpc.context.AttributeContext} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.toObject = function(includeInstance, msg) {
  var f, obj = {
origin: (f = msg.getOrigin()) && proto.google.rpc.context.AttributeContext.Peer.toObject(includeInstance, f),
source: (f = msg.getSource()) && proto.google.rpc.context.AttributeContext.Peer.toObject(includeInstance, f),
destination: (f = msg.getDestination()) && proto.google.rpc.context.AttributeContext.Peer.toObject(includeInstance, f),
request: (f = msg.getRequest()) && proto.google.rpc.context.AttributeContext.Request.toObject(includeInstance, f),
response: (f = msg.getResponse()) && proto.google.rpc.context.AttributeContext.Response.toObject(includeInstance, f),
resource: (f = msg.getResource()) && proto.google.rpc.context.AttributeContext.Resource.toObject(includeInstance, f),
api: (f = msg.getApi()) && proto.google.rpc.context.AttributeContext.Api.toObject(includeInstance, f),
extensionsList: jspb.Message.toObjectList(msg.getExtensionsList(),
    google_protobuf_any_pb.Any.toObject, includeInstance)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.google.rpc.context.AttributeContext}
 */
proto.google.rpc.context.AttributeContext.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.google.rpc.context.AttributeContext;
  return proto.google.rpc.context.AttributeContext.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.google.rpc.context.AttributeContext} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.google.rpc.context.AttributeContext}
 */
proto.google.rpc.context.AttributeContext.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 7:
      var value = new proto.google.rpc.context.AttributeContext.Peer;
      reader.readMessage(value,proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader);
      msg.setOrigin(value);
      break;
    case 1:
      var value = new proto.google.rpc.context.AttributeContext.Peer;
      reader.readMessage(value,proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader);
      msg.setSource(value);
      break;
    case 2:
      var value = new proto.google.rpc.context.AttributeContext.Peer;
      reader.readMessage(value,proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader);
      msg.setDestination(value);
      break;
    case 3:
      var value = new proto.google.rpc.context.AttributeContext.Request;
      reader.readMessage(value,proto.google.rpc.context.AttributeContext.Request.deserializeBinaryFromReader);
      msg.setRequest(value);
      break;
    case 4:
      var value = new proto.google.rpc.context.AttributeContext.Response;
      reader.readMessage(value,proto.google.rpc.context.AttributeContext.Response.deserializeBinaryFromReader);
      msg.setResponse(value);
      break;
    case 5:
      var value = new proto.google.rpc.context.AttributeContext.Resource;
      reader.readMessage(value,proto.google.rpc.context.AttributeContext.Resource.deserializeBinaryFromReader);
      msg.setResource(value);
      break;
    case 6:
      var value = new proto.google.rpc.context.AttributeContext.Api;
      reader.readMessage(value,proto.google.rpc.context.AttributeContext.Api.deserializeBinaryFromReader);
      msg.setApi(value);
      break;
    case 8:
      var value = new google_protobuf_any_pb.Any;
      reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
      msg.addExtensions(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.google.rpc.context.AttributeContext.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.google.rpc.context.AttributeContext.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.google.rpc.context.AttributeContext} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getOrigin();
  if (f != null) {
    writer.writeMessage(
      7,
      f,
      proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter
    );
  }
  f = message.getSource();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter
    );
  }
  f = message.getDestination();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter
    );
  }
  f = message.getRequest();
  if (f != null) {
    writer.writeMessage(
      3,
      f,
      proto.google.rpc.context.AttributeContext.Request.serializeBinaryToWriter
    );
  }
  f = message.getResponse();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      proto.google.rpc.context.AttributeContext.Response.serializeBinaryToWriter
    );
  }
  f = message.getResource();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      proto.google.rpc.context.AttributeContext.Resource.serializeBinaryToWriter
    );
  }
  f = message.getApi();
  if (f != null) {
    writer.writeMessage(
      6,
      f,
      proto.google.rpc.context.AttributeContext.Api.serializeBinaryToWriter
    );
  }
  f = message.getExtensionsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      8,
      f,
      google_protobuf_any_pb.Any.serializeBinaryToWriter
    );
  }
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.toObject = function(opt_includeInstance) {
  return proto.google.rpc.context.AttributeContext.Peer.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.google.rpc.context.AttributeContext.Peer} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Peer.toObject = function(includeInstance, msg) {
  var f, obj = {
ip: jspb.Message.getFieldWithDefault(msg, 1, ""),
port: jspb.Message.getFieldWithDefault(msg, 2, 0),
labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [],
principal: jspb.Message.getFieldWithDefault(msg, 7, ""),
regionCode: jspb.Message.getFieldWithDefault(msg, 8, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.google.rpc.context.AttributeContext.Peer}
 */
proto.google.rpc.context.AttributeContext.Peer.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.google.rpc.context.AttributeContext.Peer;
  return proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.google.rpc.context.AttributeContext.Peer} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.google.rpc.context.AttributeContext.Peer}
 */
proto.google.rpc.context.AttributeContext.Peer.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setIp(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setPort(value);
      break;
    case 6:
      var value = msg.getLabelsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readStringRequireUtf8, jspb.BinaryReader.prototype.readStringRequireUtf8, null, "", "");
         });
      break;
    case 7:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setPrincipal(value);
      break;
    case 8:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setRegionCode(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.google.rpc.context.AttributeContext.Peer} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Peer.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getIp();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getPort();
  if (f !== 0) {
    writer.writeInt64(
      2,
      f
    );
  }
  f = message.getLabelsMap(true);
  if (f && f.getLength() > 0) {
jspb.internal.public_for_gencode.serializeMapToBinary(
    message.getLabelsMap(true),
    6,
    writer,
    jspb.BinaryWriter.prototype.writeString,
    jspb.BinaryWriter.prototype.writeString);
  }
  f = message.getPrincipal();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
  f = message.getRegionCode();
  if (f.length > 0) {
    writer.writeString(
      8,
      f
    );
  }
};


/**
 * optional string ip = 1;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.getIp = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.setIp = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional int64 port = 2;
 * @return {number}
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.getPort = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.setPort = function(value) {
  return jspb.Message.setProto3IntField(this, 2, value);
};


/**
 * map<string, string> labels = 6;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.getLabelsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 6, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.clearLabelsMap = function() {
  this.getLabelsMap().clear();
  return this;
};


/**
 * optional string principal = 7;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.getPrincipal = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.setPrincipal = function(value) {
  return jspb.Message.setProto3StringField(this, 7, value);
};


/**
 * optional string region_code = 8;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.getRegionCode = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Peer} returns this
 */
proto.google.rpc.context.AttributeContext.Peer.prototype.setRegionCode = function(value) {
  return jspb.Message.setProto3StringField(this, 8, value);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.google.rpc.context.AttributeContext.Api.prototype.toObject = function(opt_includeInstance) {
  return proto.google.rpc.context.AttributeContext.Api.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.google.rpc.context.AttributeContext.Api} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Api.toObject = function(includeInstance, msg) {
  var f, obj = {
service: jspb.Message.getFieldWithDefault(msg, 1, ""),
operation: jspb.Message.getFieldWithDefault(msg, 2, ""),
protocol: jspb.Message.getFieldWithDefault(msg, 3, ""),
version: jspb.Message.getFieldWithDefault(msg, 4, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.google.rpc.context.AttributeContext.Api}
 */
proto.google.rpc.context.AttributeContext.Api.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.google.rpc.context.AttributeContext.Api;
  return proto.google.rpc.context.AttributeContext.Api.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.google.rpc.context.AttributeContext.Api} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.google.rpc.context.AttributeContext.Api}
 */
proto.google.rpc.context.AttributeContext.Api.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setService(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setOperation(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setProtocol(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setVersion(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.google.rpc.context.AttributeContext.Api.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.google.rpc.context.AttributeContext.Api.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.google.rpc.context.AttributeContext.Api} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Api.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getService();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getOperation();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getProtocol();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getVersion();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
};


/**
 * optional string service = 1;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Api.prototype.getService = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Api} returns this
 */
proto.google.rpc.context.AttributeContext.Api.prototype.setService = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string operation = 2;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Api.prototype.getOperation = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Api} returns this
 */
proto.google.rpc.context.AttributeContext.Api.prototype.setOperation = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string protocol = 3;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Api.prototype.getProtocol = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Api} returns this
 */
proto.google.rpc.context.AttributeContext.Api.prototype.setProtocol = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional string version = 4;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Api.prototype.getVersion = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Api} returns this
 */
proto.google.rpc.context.AttributeContext.Api.prototype.setVersion = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.google.rpc.context.AttributeContext.Auth.repeatedFields_ = [2,5];



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.toObject = function(opt_includeInstance) {
  return proto.google.rpc.context.AttributeContext.Auth.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.google.rpc.context.AttributeContext.Auth} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Auth.toObject = function(includeInstance, msg) {
  var f, obj = {
principal: jspb.Message.getFieldWithDefault(msg, 1, ""),
audiencesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
presenter: jspb.Message.getFieldWithDefault(msg, 3, ""),
claims: (f = msg.getClaims()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f),
accessLevelsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.google.rpc.context.AttributeContext.Auth}
 */
proto.google.rpc.context.AttributeContext.Auth.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.google.rpc.context.AttributeContext.Auth;
  return proto.google.rpc.context.AttributeContext.Auth.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.google.rpc.context.AttributeContext.Auth} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.google.rpc.context.AttributeContext.Auth}
 */
proto.google.rpc.context.AttributeContext.Auth.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setPrincipal(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.addAudiences(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setPresenter(value);
      break;
    case 4:
      var value = new google_protobuf_struct_pb.Struct;
      reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader);
      msg.setClaims(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.addAccessLevels(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.google.rpc.context.AttributeContext.Auth.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.google.rpc.context.AttributeContext.Auth} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Auth.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getPrincipal();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getAudiencesList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      2,
      f
    );
  }
  f = message.getPresenter();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getClaims();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      google_protobuf_struct_pb.Struct.serializeBinaryToWriter
    );
  }
  f = message.getAccessLevelsList();
  if (f.length > 0) {
    writer.writeRepeatedString(
      5,
      f
    );
  }
};


/**
 * optional string principal = 1;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.getPrincipal = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.setPrincipal = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * repeated string audiences = 2;
 * @return {!Array<string>}
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.getAudiencesList = function() {
  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
};


/**
 * @param {!Array<string>} value
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.setAudiencesList = function(value) {
  return jspb.Message.setField(this, 2, value || []);
};


/**
 * @param {string} value
 * @param {number=} opt_index
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.addAudiences = function(value, opt_index) {
  return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.clearAudiencesList = function() {
  return this.setAudiencesList([]);
};


/**
 * optional string presenter = 3;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.getPresenter = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.setPresenter = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional google.protobuf.Struct claims = 4;
 * @return {?proto.google.protobuf.Struct}
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.getClaims = function() {
  return /** @type{?proto.google.protobuf.Struct} */ (
    jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 4));
};


/**
 * @param {?proto.google.protobuf.Struct|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
*/
proto.google.rpc.context.AttributeContext.Auth.prototype.setClaims = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.clearClaims = function() {
  return this.setClaims(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.hasClaims = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * repeated string access_levels = 5;
 * @return {!Array<string>}
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.getAccessLevelsList = function() {
  return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5));
};


/**
 * @param {!Array<string>} value
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.setAccessLevelsList = function(value) {
  return jspb.Message.setField(this, 5, value || []);
};


/**
 * @param {string} value
 * @param {number=} opt_index
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.addAccessLevels = function(value, opt_index) {
  return jspb.Message.addToRepeatedField(this, 5, value, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.google.rpc.context.AttributeContext.Auth} returns this
 */
proto.google.rpc.context.AttributeContext.Auth.prototype.clearAccessLevelsList = function() {
  return this.setAccessLevelsList([]);
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.toObject = function(opt_includeInstance) {
  return proto.google.rpc.context.AttributeContext.Request.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.google.rpc.context.AttributeContext.Request} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Request.toObject = function(includeInstance, msg) {
  var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
method: jspb.Message.getFieldWithDefault(msg, 2, ""),
headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [],
path: jspb.Message.getFieldWithDefault(msg, 4, ""),
host: jspb.Message.getFieldWithDefault(msg, 5, ""),
scheme: jspb.Message.getFieldWithDefault(msg, 6, ""),
query: jspb.Message.getFieldWithDefault(msg, 7, ""),
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
size: jspb.Message.getFieldWithDefault(msg, 10, 0),
protocol: jspb.Message.getFieldWithDefault(msg, 11, ""),
reason: jspb.Message.getFieldWithDefault(msg, 12, ""),
auth: (f = msg.getAuth()) && proto.google.rpc.context.AttributeContext.Auth.toObject(includeInstance, f)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.google.rpc.context.AttributeContext.Request}
 */
proto.google.rpc.context.AttributeContext.Request.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.google.rpc.context.AttributeContext.Request;
  return proto.google.rpc.context.AttributeContext.Request.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.google.rpc.context.AttributeContext.Request} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.google.rpc.context.AttributeContext.Request}
 */
proto.google.rpc.context.AttributeContext.Request.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setId(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setMethod(value);
      break;
    case 3:
      var value = msg.getHeadersMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readStringRequireUtf8, jspb.BinaryReader.prototype.readStringRequireUtf8, null, "", "");
         });
      break;
    case 4:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setPath(value);
      break;
    case 5:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setHost(value);
      break;
    case 6:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setScheme(value);
      break;
    case 7:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setQuery(value);
      break;
    case 9:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 10:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setSize(value);
      break;
    case 11:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setProtocol(value);
      break;
    case 12:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setReason(value);
      break;
    case 13:
      var value = new proto.google.rpc.context.AttributeContext.Auth;
      reader.readMessage(value,proto.google.rpc.context.AttributeContext.Auth.deserializeBinaryFromReader);
      msg.setAuth(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.google.rpc.context.AttributeContext.Request.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.google.rpc.context.AttributeContext.Request} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Request.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getId();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getMethod();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getHeadersMap(true);
  if (f && f.getLength() > 0) {
jspb.internal.public_for_gencode.serializeMapToBinary(
    message.getHeadersMap(true),
    3,
    writer,
    jspb.BinaryWriter.prototype.writeString,
    jspb.BinaryWriter.prototype.writeString);
  }
  f = message.getPath();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getHost();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getScheme();
  if (f.length > 0) {
    writer.writeString(
      6,
      f
    );
  }
  f = message.getQuery();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      9,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getSize();
  if (f !== 0) {
    writer.writeInt64(
      10,
      f
    );
  }
  f = message.getProtocol();
  if (f.length > 0) {
    writer.writeString(
      11,
      f
    );
  }
  f = message.getReason();
  if (f.length > 0) {
    writer.writeString(
      12,
      f
    );
  }
  f = message.getAuth();
  if (f != null) {
    writer.writeMessage(
      13,
      f,
      proto.google.rpc.context.AttributeContext.Auth.serializeBinaryToWriter
    );
  }
};


/**
 * optional string id = 1;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getId = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.setId = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string method = 2;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getMethod = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.setMethod = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * map<string, string> headers = 3;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getHeadersMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 3, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.clearHeadersMap = function() {
  this.getHeadersMap().clear();
  return this;
};


/**
 * optional string path = 4;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getPath = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.setPath = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional string host = 5;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getHost = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.setHost = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


/**
 * optional string scheme = 6;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getScheme = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.setScheme = function(value) {
  return jspb.Message.setProto3StringField(this, 6, value);
};


/**
 * optional string query = 7;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getQuery = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.setQuery = function(value) {
  return jspb.Message.setProto3StringField(this, 7, value);
};


/**
 * optional google.protobuf.Timestamp time = 9;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
*/
proto.google.rpc.context.AttributeContext.Request.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 9, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.clearTime = function() {
  return this.setTime(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.hasTime = function() {
  return jspb.Message.getField(this, 9) != null;
};


/**
 * optional int64 size = 10;
 * @return {number}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getSize = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
};


/**
 * @param {number} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.setSize = function(value) {
  return jspb.Message.setProto3IntField(this, 10, value);
};


/**
 * optional string protocol = 11;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getProtocol = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.setProtocol = function(value) {
  return jspb.Message.setProto3StringField(this, 11, value);
};


/**
 * optional string reason = 12;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getReason = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.setReason = function(value) {
  return jspb.Message.setProto3StringField(this, 12, value);
};


/**
 * optional Auth auth = 13;
 * @return {?proto.google.rpc.context.AttributeContext.Auth}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.getAuth = function() {
  return /** @type{?proto.google.rpc.context.AttributeContext.Auth} */ (
    jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Auth, 13));
};


/**
 * @param {?proto.google.rpc.context.AttributeContext.Auth|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
*/
proto.google.rpc.context.AttributeContext.Request.prototype.setAuth = function(value) {
  return jspb.Message.setWrapperField(this, 13, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext.Request} returns this
 */
proto.google.rpc.context.AttributeContext.Request.prototype.clearAuth = function() {
  return this.setAuth(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.Request.prototype.hasAuth = function() {
  return jspb.Message.getField(this, 13) != null;
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.google.rpc.context.AttributeContext.Response.prototype.toObject = function(opt_includeInstance) {
  return proto.google.rpc.context.AttributeContext.Response.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.google.rpc.context.AttributeContext.Response} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Response.toObject = function(includeInstance, msg) {
  var f, obj = {
code: jspb.Message.getFieldWithDefault(msg, 1, 0),
size: jspb.Message.getFieldWithDefault(msg, 2, 0),
headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [],
time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
backendLatency: (f = msg.getBackendLatency()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.google.rpc.context.AttributeContext.Response}
 */
proto.google.rpc.context.AttributeContext.Response.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.google.rpc.context.AttributeContext.Response;
  return proto.google.rpc.context.AttributeContext.Response.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.google.rpc.context.AttributeContext.Response} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.google.rpc.context.AttributeContext.Response}
 */
proto.google.rpc.context.AttributeContext.Response.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setCode(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setSize(value);
      break;
    case 3:
      var value = msg.getHeadersMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readStringRequireUtf8, jspb.BinaryReader.prototype.readStringRequireUtf8, null, "", "");
         });
      break;
    case 4:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setTime(value);
      break;
    case 5:
      var value = new google_protobuf_duration_pb.Duration;
      reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
      msg.setBackendLatency(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.google.rpc.context.AttributeContext.Response.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.google.rpc.context.AttributeContext.Response.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.google.rpc.context.AttributeContext.Response} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Response.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getCode();
  if (f !== 0) {
    writer.writeInt64(
      1,
      f
    );
  }
  f = message.getSize();
  if (f !== 0) {
    writer.writeInt64(
      2,
      f
    );
  }
  f = message.getHeadersMap(true);
  if (f && f.getLength() > 0) {
jspb.internal.public_for_gencode.serializeMapToBinary(
    message.getHeadersMap(true),
    3,
    writer,
    jspb.BinaryWriter.prototype.writeString,
    jspb.BinaryWriter.prototype.writeString);
  }
  f = message.getTime();
  if (f != null) {
    writer.writeMessage(
      4,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getBackendLatency();
  if (f != null) {
    writer.writeMessage(
      5,
      f,
      google_protobuf_duration_pb.Duration.serializeBinaryToWriter
    );
  }
};


/**
 * optional int64 code = 1;
 * @return {number}
 */
proto.google.rpc.context.AttributeContext.Response.prototype.getCode = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/**
 * @param {number} value
 * @return {!proto.google.rpc.context.AttributeContext.Response} returns this
 */
proto.google.rpc.context.AttributeContext.Response.prototype.setCode = function(value) {
  return jspb.Message.setProto3IntField(this, 1, value);
};


/**
 * optional int64 size = 2;
 * @return {number}
 */
proto.google.rpc.context.AttributeContext.Response.prototype.getSize = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.google.rpc.context.AttributeContext.Response} returns this
 */
proto.google.rpc.context.AttributeContext.Response.prototype.setSize = function(value) {
  return jspb.Message.setProto3IntField(this, 2, value);
};


/**
 * map<string, string> headers = 3;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.google.rpc.context.AttributeContext.Response.prototype.getHeadersMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 3, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.google.rpc.context.AttributeContext.Response} returns this
 */
proto.google.rpc.context.AttributeContext.Response.prototype.clearHeadersMap = function() {
  this.getHeadersMap().clear();
  return this;
};


/**
 * optional google.protobuf.Timestamp time = 4;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.google.rpc.context.AttributeContext.Response.prototype.getTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext.Response} returns this
*/
proto.google.rpc.context.AttributeContext.Response.prototype.setTime = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext.Response} returns this
 */
proto.google.rpc.context.AttributeContext.Response.prototype.clearTime = function() {
  return this.setTime(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.Response.prototype.hasTime = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * optional google.protobuf.Duration backend_latency = 5;
 * @return {?proto.google.protobuf.Duration}
 */
proto.google.rpc.context.AttributeContext.Response.prototype.getBackendLatency = function() {
  return /** @type{?proto.google.protobuf.Duration} */ (
    jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 5));
};


/**
 * @param {?proto.google.protobuf.Duration|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext.Response} returns this
*/
proto.google.rpc.context.AttributeContext.Response.prototype.setBackendLatency = function(value) {
  return jspb.Message.setWrapperField(this, 5, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext.Response} returns this
 */
proto.google.rpc.context.AttributeContext.Response.prototype.clearBackendLatency = function() {
  return this.setBackendLatency(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.Response.prototype.hasBackendLatency = function() {
  return jspb.Message.getField(this, 5) != null;
};





if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * Optional fields that are not set will be set to undefined.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
 * @param {boolean=} opt_includeInstance Deprecated. whether to include the
 *     JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @return {!Object}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.toObject = function(opt_includeInstance) {
  return proto.google.rpc.context.AttributeContext.Resource.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Deprecated. Whether to include
 *     the JSPB instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.google.rpc.context.AttributeContext.Resource} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Resource.toObject = function(includeInstance, msg) {
  var f, obj = {
service: jspb.Message.getFieldWithDefault(msg, 1, ""),
name: jspb.Message.getFieldWithDefault(msg, 2, ""),
type: jspb.Message.getFieldWithDefault(msg, 3, ""),
labelsMap: (f = msg.getLabelsMap()) ? f.toObject(includeInstance, undefined) : [],
uid: jspb.Message.getFieldWithDefault(msg, 5, ""),
annotationsMap: (f = msg.getAnnotationsMap()) ? f.toObject(includeInstance, undefined) : [],
displayName: jspb.Message.getFieldWithDefault(msg, 7, ""),
createTime: (f = msg.getCreateTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
updateTime: (f = msg.getUpdateTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
deleteTime: (f = msg.getDeleteTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
etag: jspb.Message.getFieldWithDefault(msg, 11, ""),
location: jspb.Message.getFieldWithDefault(msg, 12, "")
  };

  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Deserializes binary data (in protobuf wire format).
 * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
 * @return {!proto.google.rpc.context.AttributeContext.Resource}
 */
proto.google.rpc.context.AttributeContext.Resource.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.google.rpc.context.AttributeContext.Resource;
  return proto.google.rpc.context.AttributeContext.Resource.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.google.rpc.context.AttributeContext.Resource} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.google.rpc.context.AttributeContext.Resource}
 */
proto.google.rpc.context.AttributeContext.Resource.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setService(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setName(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setType(value);
      break;
    case 4:
      var value = msg.getLabelsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readStringRequireUtf8, jspb.BinaryReader.prototype.readStringRequireUtf8, null, "", "");
         });
      break;
    case 5:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setUid(value);
      break;
    case 6:
      var value = msg.getAnnotationsMap();
      reader.readMessage(value, function(message, reader) {
        jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readStringRequireUtf8, jspb.BinaryReader.prototype.readStringRequireUtf8, null, "", "");
         });
      break;
    case 7:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setDisplayName(value);
      break;
    case 8:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setCreateTime(value);
      break;
    case 9:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setUpdateTime(value);
      break;
    case 10:
      var value = new google_protobuf_timestamp_pb.Timestamp;
      reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
      msg.setDeleteTime(value);
      break;
    case 11:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setEtag(value);
      break;
    case 12:
      var value = /** @type {string} */ (reader.readStringRequireUtf8());
      msg.setLocation(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.google.rpc.context.AttributeContext.Resource.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.google.rpc.context.AttributeContext.Resource} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.google.rpc.context.AttributeContext.Resource.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getService();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getName();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
  f = message.getType();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getLabelsMap(true);
  if (f && f.getLength() > 0) {
jspb.internal.public_for_gencode.serializeMapToBinary(
    message.getLabelsMap(true),
    4,
    writer,
    jspb.BinaryWriter.prototype.writeString,
    jspb.BinaryWriter.prototype.writeString);
  }
  f = message.getUid();
  if (f.length > 0) {
    writer.writeString(
      5,
      f
    );
  }
  f = message.getAnnotationsMap(true);
  if (f && f.getLength() > 0) {
jspb.internal.public_for_gencode.serializeMapToBinary(
    message.getAnnotationsMap(true),
    6,
    writer,
    jspb.BinaryWriter.prototype.writeString,
    jspb.BinaryWriter.prototype.writeString);
  }
  f = message.getDisplayName();
  if (f.length > 0) {
    writer.writeString(
      7,
      f
    );
  }
  f = message.getCreateTime();
  if (f != null) {
    writer.writeMessage(
      8,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getUpdateTime();
  if (f != null) {
    writer.writeMessage(
      9,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getDeleteTime();
  if (f != null) {
    writer.writeMessage(
      10,
      f,
      google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
    );
  }
  f = message.getEtag();
  if (f.length > 0) {
    writer.writeString(
      11,
      f
    );
  }
  f = message.getLocation();
  if (f.length > 0) {
    writer.writeString(
      12,
      f
    );
  }
};


/**
 * optional string service = 1;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getService = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.setService = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string name = 2;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getName = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.setName = function(value) {
  return jspb.Message.setProto3StringField(this, 2, value);
};


/**
 * optional string type = 3;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getType = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.setType = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * map<string, string> labels = 4;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getLabelsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 4, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.clearLabelsMap = function() {
  this.getLabelsMap().clear();
  return this;
};


/**
 * optional string uid = 5;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getUid = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.setUid = function(value) {
  return jspb.Message.setProto3StringField(this, 5, value);
};


/**
 * map<string, string> annotations = 6;
 * @param {boolean=} opt_noLazyCreate Do not create the map if
 * empty, instead returning `undefined`
 * @return {!jspb.Map<string,string>}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getAnnotationsMap = function(opt_noLazyCreate) {
  return /** @type {!jspb.Map<string,string>} */ (
      jspb.Message.getMapField(this, 6, opt_noLazyCreate,
      null));
};


/**
 * Clears values from the map. The map will be non-null.
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.clearAnnotationsMap = function() {
  this.getAnnotationsMap().clear();
  return this;
};


/**
 * optional string display_name = 7;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getDisplayName = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.setDisplayName = function(value) {
  return jspb.Message.setProto3StringField(this, 7, value);
};


/**
 * optional google.protobuf.Timestamp create_time = 8;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getCreateTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 8));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
*/
proto.google.rpc.context.AttributeContext.Resource.prototype.setCreateTime = function(value) {
  return jspb.Message.setWrapperField(this, 8, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.clearCreateTime = function() {
  return this.setCreateTime(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.hasCreateTime = function() {
  return jspb.Message.getField(this, 8) != null;
};


/**
 * optional google.protobuf.Timestamp update_time = 9;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getUpdateTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
*/
proto.google.rpc.context.AttributeContext.Resource.prototype.setUpdateTime = function(value) {
  return jspb.Message.setWrapperField(this, 9, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.clearUpdateTime = function() {
  return this.setUpdateTime(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.hasUpdateTime = function() {
  return jspb.Message.getField(this, 9) != null;
};


/**
 * optional google.protobuf.Timestamp delete_time = 10;
 * @return {?proto.google.protobuf.Timestamp}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getDeleteTime = function() {
  return /** @type{?proto.google.protobuf.Timestamp} */ (
    jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 10));
};


/**
 * @param {?proto.google.protobuf.Timestamp|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
*/
proto.google.rpc.context.AttributeContext.Resource.prototype.setDeleteTime = function(value) {
  return jspb.Message.setWrapperField(this, 10, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.clearDeleteTime = function() {
  return this.setDeleteTime(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.hasDeleteTime = function() {
  return jspb.Message.getField(this, 10) != null;
};


/**
 * optional string etag = 11;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getEtag = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.setEtag = function(value) {
  return jspb.Message.setProto3StringField(this, 11, value);
};


/**
 * optional string location = 12;
 * @return {string}
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.getLocation = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
};


/**
 * @param {string} value
 * @return {!proto.google.rpc.context.AttributeContext.Resource} returns this
 */
proto.google.rpc.context.AttributeContext.Resource.prototype.setLocation = function(value) {
  return jspb.Message.setProto3StringField(this, 12, value);
};


/**
 * optional Peer origin = 7;
 * @return {?proto.google.rpc.context.AttributeContext.Peer}
 */
proto.google.rpc.context.AttributeContext.prototype.getOrigin = function() {
  return /** @type{?proto.google.rpc.context.AttributeContext.Peer} */ (
    jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Peer, 7));
};


/**
 * @param {?proto.google.rpc.context.AttributeContext.Peer|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext} returns this
*/
proto.google.rpc.context.AttributeContext.prototype.setOrigin = function(value) {
  return jspb.Message.setWrapperField(this, 7, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext} returns this
 */
proto.google.rpc.context.AttributeContext.prototype.clearOrigin = function() {
  return this.setOrigin(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.prototype.hasOrigin = function() {
  return jspb.Message.getField(this, 7) != null;
};


/**
 * optional Peer source = 1;
 * @return {?proto.google.rpc.context.AttributeContext.Peer}
 */
proto.google.rpc.context.AttributeContext.prototype.getSource = function() {
  return /** @type{?proto.google.rpc.context.AttributeContext.Peer} */ (
    jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Peer, 1));
};


/**
 * @param {?proto.google.rpc.context.AttributeContext.Peer|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext} returns this
*/
proto.google.rpc.context.AttributeContext.prototype.setSource = function(value) {
  return jspb.Message.setWrapperField(this, 1, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext} returns this
 */
proto.google.rpc.context.AttributeContext.prototype.clearSource = function() {
  return this.setSource(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.prototype.hasSource = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional Peer destination = 2;
 * @return {?proto.google.rpc.context.AttributeContext.Peer}
 */
proto.google.rpc.context.AttributeContext.prototype.getDestination = function() {
  return /** @type{?proto.google.rpc.context.AttributeContext.Peer} */ (
    jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Peer, 2));
};


/**
 * @param {?proto.google.rpc.context.AttributeContext.Peer|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext} returns this
*/
proto.google.rpc.context.AttributeContext.prototype.setDestination = function(value) {
  return jspb.Message.setWrapperField(this, 2, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext} returns this
 */
proto.google.rpc.context.AttributeContext.prototype.clearDestination = function() {
  return this.setDestination(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.prototype.hasDestination = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional Request request = 3;
 * @return {?proto.google.rpc.context.AttributeContext.Request}
 */
proto.google.rpc.context.AttributeContext.prototype.getRequest = function() {
  return /** @type{?proto.google.rpc.context.AttributeContext.Request} */ (
    jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Request, 3));
};


/**
 * @param {?proto.google.rpc.context.AttributeContext.Request|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext} returns this
*/
proto.google.rpc.context.AttributeContext.prototype.setRequest = function(value) {
  return jspb.Message.setWrapperField(this, 3, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext} returns this
 */
proto.google.rpc.context.AttributeContext.prototype.clearRequest = function() {
  return this.setRequest(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.prototype.hasRequest = function() {
  return jspb.Message.getField(this, 3) != null;
};


/**
 * optional Response response = 4;
 * @return {?proto.google.rpc.context.AttributeContext.Response}
 */
proto.google.rpc.context.AttributeContext.prototype.getResponse = function() {
  return /** @type{?proto.google.rpc.context.AttributeContext.Response} */ (
    jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Response, 4));
};


/**
 * @param {?proto.google.rpc.context.AttributeContext.Response|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext} returns this
*/
proto.google.rpc.context.AttributeContext.prototype.setResponse = function(value) {
  return jspb.Message.setWrapperField(this, 4, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext} returns this
 */
proto.google.rpc.context.AttributeContext.prototype.clearResponse = function() {
  return this.setResponse(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.prototype.hasResponse = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * optional Resource resource = 5;
 * @return {?proto.google.rpc.context.AttributeContext.Resource}
 */
proto.google.rpc.context.AttributeContext.prototype.getResource = function() {
  return /** @type{?proto.google.rpc.context.AttributeContext.Resource} */ (
    jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Resource, 5));
};


/**
 * @param {?proto.google.rpc.context.AttributeContext.Resource|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext} returns this
*/
proto.google.rpc.context.AttributeContext.prototype.setResource = function(value) {
  return jspb.Message.setWrapperField(this, 5, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext} returns this
 */
proto.google.rpc.context.AttributeContext.prototype.clearResource = function() {
  return this.setResource(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.prototype.hasResource = function() {
  return jspb.Message.getField(this, 5) != null;
};


/**
 * optional Api api = 6;
 * @return {?proto.google.rpc.context.AttributeContext.Api}
 */
proto.google.rpc.context.AttributeContext.prototype.getApi = function() {
  return /** @type{?proto.google.rpc.context.AttributeContext.Api} */ (
    jspb.Message.getWrapperField(this, proto.google.rpc.context.AttributeContext.Api, 6));
};


/**
 * @param {?proto.google.rpc.context.AttributeContext.Api|undefined} value
 * @return {!proto.google.rpc.context.AttributeContext} returns this
*/
proto.google.rpc.context.AttributeContext.prototype.setApi = function(value) {
  return jspb.Message.setWrapperField(this, 6, value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.google.rpc.context.AttributeContext} returns this
 */
proto.google.rpc.context.AttributeContext.prototype.clearApi = function() {
  return this.setApi(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.google.rpc.context.AttributeContext.prototype.hasApi = function() {
  return jspb.Message.getField(this, 6) != null;
};


/**
 * repeated google.protobuf.Any extensions = 8;
 * @return {!Array<!proto.google.protobuf.Any>}
 */
proto.google.rpc.context.AttributeContext.prototype.getExtensionsList = function() {
  return /** @type{!Array<!proto.google.protobuf.Any>} */ (
    jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 8));
};


/**
 * @param {!Array<!proto.google.protobuf.Any>} value
 * @return {!proto.google.rpc.context.AttributeContext} returns this
*/
proto.google.rpc.context.AttributeContext.prototype.setExtensionsList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 8, value);
};


/**
 * @param {!proto.google.protobuf.Any=} opt_value
 * @param {number=} opt_index
 * @return {!proto.google.protobuf.Any}
 */
proto.google.rpc.context.AttributeContext.prototype.addExtensions = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.google.protobuf.Any, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.google.rpc.context.AttributeContext} returns this
 */
proto.google.rpc.context.AttributeContext.prototype.clearExtensionsList = function() {
  return this.setExtensionsList([]);
};


goog.object.extend(exports, proto.google.rpc.context);
